Clover coverage report - Enterprise Web Services - 1.0
Coverage timestamp: Mon May 30 2005 17:10:32 CEST
file stats: LOC: 123   Methods: 11
NCLOC: 90   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
GenerationFactoryImpl.java 75% 82.6% 90.9% 82.6%
coverage coverage
 1   
 /*
 2   
  * Copyright 2001-2004 The Apache Software Foundation.
 3   
  * 
 4   
  * Licensed under the Apache License, Version 2.0 (the "License");
 5   
  * you may not use this file except in compliance with the License.
 6   
  * You may obtain a copy of the License at
 7   
  * 
 8   
  *      http://www.apache.org/licenses/LICENSE-2.0
 9   
  * 
 10   
  * Unless required by applicable law or agreed to in writing, software
 11   
  * distributed under the License is distributed on an "AS IS" BASIS,
 12   
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13   
  * See the License for the specific language governing permissions and
 14   
  * limitations under the License.
 15   
  */
 16   
 
 17   
 package org.apache.geronimo.ews.ws4j2ee.toWs.impl;
 18   
 
 19   
 import org.apache.axis.wsdl.fromJava.Emitter;
 20   
 import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
 21   
 import org.apache.geronimo.ews.ws4j2ee.context.j2eeDD.EJBContext;
 22   
 import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationConstants;
 23   
 import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
 24   
 import org.apache.geronimo.ews.ws4j2ee.toWs.Generator;
 25   
 import org.apache.geronimo.ews.ws4j2ee.toWs.Writer;
 26   
 import org.apache.geronimo.ews.ws4j2ee.toWs.Ws4J2eeDeployContext;
 27   
 import org.apache.geronimo.ews.ws4j2ee.toWs.dd.J2EEContainerSpecificDDGenerator;
 28   
 import org.apache.geronimo.ews.ws4j2ee.toWs.dd.JaxrpcMapperGenerator;
 29   
 import org.apache.geronimo.ews.ws4j2ee.toWs.dd.WebContainerDDGenerator;
 30   
 import org.apache.geronimo.ews.ws4j2ee.toWs.ejb.EJBDDWriter;
 31   
 import org.apache.geronimo.ews.ws4j2ee.toWs.ejb.EJBGenerator;
 32   
 import org.apache.geronimo.ews.ws4j2ee.toWs.ejb.EJBHomeWriter;
 33   
 import org.apache.geronimo.ews.ws4j2ee.toWs.ejb.EJBLocalHomeWriter;
 34   
 import org.apache.geronimo.ews.ws4j2ee.toWs.ejb.EJBRemoteWriter;
 35   
 import org.apache.geronimo.ews.ws4j2ee.toWs.ejb.SessionBeanWriter;
 36   
 import org.apache.geronimo.ews.ws4j2ee.toWs.handlers.HandlerGenerator;
 37   
 import org.apache.geronimo.ews.ws4j2ee.toWs.misc.BuildFileConfigurer;
 38   
 import org.apache.geronimo.ews.ws4j2ee.toWs.wrapperWs.WrapperWsGenerator;
 39   
 import org.apache.geronimo.ews.ws4j2ee.toWs.ws.ClientSideWsGenerator;
 40   
 import org.apache.geronimo.ews.ws4j2ee.toWs.ws.ServerSideWsGenerator;
 41   
 import org.apache.geronimo.ews.ws4j2ee.toWs.wsdl.WSDLGenerator;
 42   
 
 43   
 /**
 44   
  * @author hemapani@opensource.lk
 45   
  */
 46   
 public class GenerationFactoryImpl
 47   
         implements org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFactory {
 48  26
     public Writer createEJBWriter(J2EEWebServiceContext j2eewscontext,
 49   
                                   EJBContext ejbcontext,
 50   
                                   int writerType)
 51   
             throws GenerationFault {
 52  26
         if (GenerationConstants.EJB_DD_WRITER == writerType)
 53  8
             return new EJBDDWriter(j2eewscontext, ejbcontext);
 54  18
         else if (GenerationConstants.EJB_HOME_INTERFACE_WRITER == writerType)
 55  8
             return new EJBHomeWriter(j2eewscontext, ejbcontext);
 56  10
         else if (GenerationConstants.EJB_REMOTE_INTERFACE_WRITER == writerType)
 57  8
             return new EJBRemoteWriter(j2eewscontext, ejbcontext);
 58  2
         else if (
 59  2
                 GenerationConstants.EJB_LOCAL_HOME_INTERFACE_WRITER == writerType)
 60  0
             return new EJBLocalHomeWriter(j2eewscontext, ejbcontext);
 61  2
         else if (GenerationConstants.EJB_LOCAL_INTERFACE_WRITER == writerType)
 62  0
             return new EJBLocalHomeWriter(j2eewscontext, ejbcontext);
 63  2
         else if (
 64  2
                 GenerationConstants.EJB_IMPLEMENTATION_BEAN_WRITER == writerType)
 65  2
             return new SessionBeanWriter(j2eewscontext, ejbcontext);
 66   
         else
 67  0
             throw new GenerationFault("the writer not found");
 68   
     }
 69   
 
 70  8
     public Generator createEJBGenerator(J2EEWebServiceContext j2eewscontext)
 71   
             throws GenerationFault {
 72  8
         return new EJBGenerator(j2eewscontext);
 73   
     }
 74   
 
 75  11
     public Generator createWrapperWsGenerator(J2EEWebServiceContext j2eewscontext)
 76   
             throws GenerationFault {
 77  11
         return new WrapperWsGenerator(j2eewscontext);
 78   
     }
 79   
 
 80  4
     public Generator createClientSideWsGenerator(J2EEWebServiceContext j2eewscontext)
 81   
             throws GenerationFault {
 82  4
         return new ClientSideWsGenerator(j2eewscontext);
 83   
     }
 84   
 
 85  11
     public Generator createWSDLGenerator(J2EEWebServiceContext wscontext,
 86   
                                          Emitter emitter,
 87   
                                          Ws4J2eeDeployContext clparser)
 88   
             throws GenerationFault {
 89  11
         return new WSDLGenerator(wscontext, emitter, clparser);
 90   
     }
 91   
 
 92  11
     public Generator createServerSideWsGenerator(J2EEWebServiceContext j2eewscontext)
 93   
             throws GenerationFault {
 94  11
         return new ServerSideWsGenerator(j2eewscontext);
 95   
     }
 96   
 
 97  15
     public Generator createHandlerGenerator(J2EEWebServiceContext j2eewscontext)
 98   
             throws GenerationFault {
 99  15
         return new HandlerGenerator(j2eewscontext);
 100   
     }
 101   
 
 102  11
     public Generator createJaxrpcMapperGenerator(J2EEWebServiceContext j2eewscontext)
 103   
             throws GenerationFault {
 104  11
         return new JaxrpcMapperGenerator(j2eewscontext);
 105   
     }
 106   
 
 107  8
     public Generator createContainerSpecificDDGenerator(J2EEWebServiceContext j2eewscontext)
 108   
             throws GenerationFault {
 109  8
         return new J2EEContainerSpecificDDGenerator(j2eewscontext);
 110   
     }
 111   
 
 112  11
     public Generator createBuildFileGenerator(J2EEWebServiceContext j2eewscontext)
 113   
             throws GenerationFault {
 114  11
         return new BuildFileConfigurer(j2eewscontext);
 115   
     }
 116   
 
 117  0
     public Generator createWebContainerDDGenerator(J2EEWebServiceContext j2eewscontext)
 118   
             throws GenerationFault {
 119  0
         return new WebContainerDDGenerator(j2eewscontext);
 120   
     }
 121   
 
 122   
 }
 123